Drilling fluid contains solids, and gas bubbles. In an active well, the drilling fluid is monitored with sensors, and drilling parameters are determined. The level of hydrocarbons in the drilling fluid is also measured and evaluated. However, the solids and gas bubbles of the drilling fluid can affect the measurements and/or further processing or use of the drilling fluid.